Sort List of tuples based on last element

join shbcf.ru